import http from './ajaxfun'
import {
    LOGINREGISTER_ajax,
    ISLOGINUSER_ajax,
    ADMINLOGIN_ajax,
    MENU_ajax,
    USERLIST_ajax,
    USERSTATE_ajax,
    USERSAVE_ajax,
    USERUPDATE_ajax,
    USERDELETE_ajax,
    RESETPWD_ajax,
    USERALLDELETE_ajax,
    LOGINOUT_ajax,
    TYPELIST_ajax,
    TYPESAVE_ajax,
    TYPEUPDATE_ajax,
    TYPEDELETE_ajax,
    TYPELISTALL_ajax,
    NEWSLIST_ajax,
    NEWSSTATE_ajax,
    NEWSSAVE_ajax,
    NEWSUPDATE_ajax,
    NEWSDELETE_ajax,
    SWIPERLIST_ajax,
    SWIPERSAVE_ajax,
    SWIPERUPDATE_ajax,
    SWIPERDELETE_ajax,
    SENSITIVESLISTALL_ajax,
    SENSITIVESSAVE_ajax,
    SENSITIVESDELETE_ajax,
    ADMINLIST_ajax,
    ADMINSAVE_ajax,
    ADMINDELETE_ajax,
    COUNTDATA_ajax,
    USERWORD_ajax,
    NEWSWORD_ajax,
    GETCPUTABLE_ajax,
    NEWTYPENUM_ajax,
    NEWSLIST_user_ajax,
    SWIPERLIST_user_ajax,
    NEWSINFO_user_ajax,
    ADDCOLLECTION_user_ajax,
    DELCOLLECTION_user_ajax,
    COMMLIST_user_ajax,
    ADDCOMMENT_user_ajax,
    ADDWATCH_user_ajax,
    TYPELISTALL_user_ajax,
    USERNEWSSAVE_user_ajax
} from './url'

const configky = '/apis';
// const configky='';
/**
 * 前台的方法
 */
export const loginRgister = (data) => http.postFormData(`${configky}${LOGINREGISTER_ajax}`, data)
export const isLoginUser = (data) => http.post(`${configky}${ISLOGINUSER_ajax}`, data)
export const newsList_user = (data) => http.post(`${configky}${NEWSLIST_user_ajax}`, data);
export const swiperList_user = (data) => http.post(`${configky}${SWIPERLIST_user_ajax}`, data);
export const newsInfo_user = (data) => http.post(`${configky}${NEWSINFO_user_ajax}`, data);
export const addCollection_user = (data) => http.post(`${configky}${ADDCOLLECTION_user_ajax}`, data);
export const delCollection_user = (data) => http.post(`${configky}${DELCOLLECTION_user_ajax}`, data);
export const commList_user = (data) => http.post(`${configky}${COMMLIST_user_ajax}`, data);
export const addComment_user = (data) => http.post(`${configky}${ADDCOMMENT_user_ajax}`, data);
export const addWatch_user = (data) => http.post(`${configky}${ADDWATCH_user_ajax}`, data);
export const typeListAll_user = (data) => http.post(`${configky}${TYPELISTALL_user_ajax}`, data);
export const userNewsSave_user = (data) => http.post(`${configky}${USERNEWSSAVE_user_ajax}`, data);
/**
 * 后台的方法
 */
export const adminLogin = (data) => http.post(`${configky}${ADMINLOGIN_ajax}`, data);
export const menu = () => http.get(`${configky}${MENU_ajax}`);
export const userList = (data) => http.post(`${configky}${USERLIST_ajax}`, data);
export const userState = (data) => http.post(`${configky}${USERSTATE_ajax}`, data);
export const userSave = (data) => http.post(`${configky}${USERSAVE_ajax}`, data);
export const userUpdate = (data) => http.post(`${configky}${USERUPDATE_ajax}`, data);
export const userDelete = (data) => http.post(`${configky}${USERDELETE_ajax}`, data);
export const resetpwd = (data) => http.post(`${configky}${RESETPWD_ajax}`, data);
export const userAllDelete = (data) => http.post(`${configky}${USERALLDELETE_ajax}`, data);
export const loginout = (data) => http.post(`${configky}${LOGINOUT_ajax}`, data);
export const typeList = (data) => http.post(`${configky}${TYPELIST_ajax}`, data);
export const typeSave = (data) => http.post(`${configky}${TYPESAVE_ajax}`, data);
export const typeUpdate = (data) => http.post(`${configky}${TYPEUPDATE_ajax}`, data);
export const typeDelete = (data) => http.post(`${configky}${TYPEDELETE_ajax}`, data);
export const typeListAll = (data) => http.post(`${configky}${TYPELISTALL_ajax}`, data);
export const newsList = (data) => http.post(`${configky}${NEWSLIST_ajax}`, data);
export const newsState = (data) => http.post(`${configky}${NEWSSTATE_ajax}`, data);
export const newsSave = (data) => http.post(`${configky}${NEWSSAVE_ajax}`, data);
export const newsUpdate = (data) => http.post(`${configky}${NEWSUPDATE_ajax}`, data);
export const newsDelete = (data) => http.post(`${configky}${NEWSDELETE_ajax}`, data);
export const swiperList = (data) => http.post(`${configky}${SWIPERLIST_ajax}`, data);
export const swiperSave = (data) => http.post(`${configky}${SWIPERSAVE_ajax}`, data);
export const swiperUpdate = (data) => http.post(`${configky}${SWIPERUPDATE_ajax}`, data);
export const swiperDelete = (data) => http.post(`${configky}${SWIPERDELETE_ajax}`, data);
export const sensitivesListAll = (data) => http.post(`${configky}${SENSITIVESLISTALL_ajax}`, data);
export const sensitivesSave = (data) => http.post(`${configky}${SENSITIVESSAVE_ajax}`, data);
export const sensitivesDelete = (data) => http.post(`${configky}${SENSITIVESDELETE_ajax}`, data);
export const adminList = (data) => http.post(`${configky}${ADMINLIST_ajax}`, data);
export const adminSave = (data) => http.post(`${configky}${ADMINSAVE_ajax}`, data);
export const adminDelete = (data) => http.post(`${configky}${ADMINDELETE_ajax}`, data);
export const countData = (data) => http.post(`${configky}${COUNTDATA_ajax}`, data);
export const userWord = (data) => http.post(`${configky}${USERWORD_ajax}`, data);
export const newsWord = (data) => http.post(`${configky}${NEWSWORD_ajax}`, data);
export const getCpuTable = (data) => http.post(`${configky}${GETCPUTABLE_ajax}`, data);
export const newtypeNum = (data) => http.post(`${configky}${NEWTYPENUM_ajax}`, data);